package com.fg.cloud.manager.service.system.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.fg.cloud.manager.entry.system.AgencyCollectionOrderEntity;
import com.fg.cloud.manager.entry.system.CommodityEntity;
import com.fg.cloud.manager.entry.system.StockEntity;
import com.fg.cloud.manager.entry.system.vo.DealerSetVo;
import com.fg.cloud.manager.mapper.system.SystemDealerSetMapper;
import com.fg.cloud.manager.service.system.SystemDealerSetService;

/**
  * Description:经销商权限设置实现类
  * @author 陈银龙
  * @date 2017年8月7日上午11:49:18
 */
@Service
public class SystemDealerSetServiceImol implements SystemDealerSetService{
	
	@Autowired
	private SystemDealerSetMapper systemDealerSetMapper;

	@Override
	public List<DealerSetVo> findDelByAgeIdAndFacId(long facId) {
		return systemDealerSetMapper.findDelByAgeIdAndFacId(facId);
	}

	@Override
	public List<AgencyCollectionOrderEntity> findDorByFacId(long facId) {
		return systemDealerSetMapper.findDorByFacId(facId);
	}

	@Override
	@Transactional
	public int insertDor(AgencyCollectionOrderEntity dorvo) {
		return systemDealerSetMapper.insertDor(dorvo);
	}

	@Override
	@Transactional
	public int updateDor(AgencyCollectionOrderEntity dorvo) {
		return systemDealerSetMapper.updateDor(dorvo);
	}

	@Override
	public List<StockEntity> findStockByFacId(Long facId) {
		return systemDealerSetMapper.findStockByFacId(facId);
	}

	@Override
	@Transactional
	public int insertStock(StockEntity sv) {
		return systemDealerSetMapper.insertStock(sv);
	}

	@Override
	@Transactional
	public int updateStock(StockEntity sv) {
		return systemDealerSetMapper.updateStock(sv);
	}

	@Override
	public List<CommodityEntity> findCommodityByFacId(Long facId) {
		return systemDealerSetMapper.findCommodityByFacId(facId);
	}

	@Override
	@Transactional
	public int insertCommodity(CommodityEntity cv) {
		return systemDealerSetMapper.insertCommodity(cv);
	}

	@Override
	@Transactional
	public int updateCommodity(CommodityEntity cv) {
		return systemDealerSetMapper.updateCommodity(cv);
	}

}
